When graphics card is assigned to a guest as a secondary VGA,
without gfx_passthru and emulated VGA is the primary VGA,
hvmloader misreads gfx_passthru is specified if VGA device is
found after the emulated VGA.
This patch fix this issue. If emulated VGA is found, hvmloader
preserves it and loads vgabios of the emulated VGA.
Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
switch ( class )
{
case 0x0300:
+ /* If emulated VGA is found, preserve it as primary VGA. */
if ( (vendor_id == 0x1234) && (device_id == 0x1111) )
virtual_vga = VGA_std;
else if ( (vendor_id == 0x1013) && (device_id == 0xb8) )
virtual_vga = VGA_cirrus;
- else
+ else if ( virtual_vga == VGA_none )
virtual_vga = VGA_pt;
break;
case 0x0680: